package com.lingxu.traffic.controller;

import com.lingxu.traffic.dto.ProjectChangeDTO;
import com.lingxu.traffic.dto.ProjectWarningDTO;
import com.lingxu.traffic.service.ProjectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping(value = "/change")
public class ProjectChangeController {

    @Resource
    private ProjectService projectService;

    /**
     *  设计变更监督
     *
     * @param proType
     * @return {@link List }<{@link ProjectChangeDTO }>
     */
    @GetMapping("/changeSupervise")
    public List<ProjectChangeDTO> changeSupervise(String proType) {
        return projectService.getChangeSupervise(proType);
    }

    /**
     *  预警数据分析
     *
     * @return {@link List }<{@link ProjectWarningDTO }>
     */
    @GetMapping("/warningDataAnalyze")
    public List<ProjectWarningDTO> warningDataAnalyze() {
        return projectService.getWarningDataAnalyze();
    }
}
